<html>
<body>
<div>
Tests error recovery in CSS selectors.
</div>

<style>.hidden-by-default div {display: none}</style>
<div class="hidden-by-default">

<style>[{}#test1{display: block}]{}</style>
<div id="test1"></div>

<style>[#{}#test2{display: block}]{}</style>
<div id="test2"></div>
    
<style>[x{}#test3{display: block}]{}</style>
<div id="test3"></div>

<style>:-webkit-any({}#test4{display: block}){}</style>
<div id="test4"></div>

<style>:func({}#test5{display: block}){}</style>
<div id="test5"></div>

<style>:cue({}#test6{display: block}){}</style>
<div id="test6"></div>

<style>::cue({}#test7{display: block}){}</style>
<div id="test7"></div>

<style>x,:cue({}#test8{display: block}){}</style>
<div id="test8"></div>

<style>x,cue({}#test9{display: block}){}</style>
<div id="test9"></div>

<style>x,:cue({}#test10{display: block}){}</style>
<div id="test10"></div>

<style>x,(url('example.org'){}#test11{display: block}){}</style>
<div id="test11"></div>

</div>

<script type="text/javascript">
if (window.testRunner)
    testRunner.dumpAsText();

var tests = document.querySelectorAll("[id^=test]");
for (var i = 0; i < tests.length; i++)
    tests[i].textContent = "Test " + tests[i].id + " failed.";
</script>
</body>
